<td>
  {{ exam.title }}
</td>
<td>
  {% if exam_paper %}
    <a href="{% url "exam:score" exam_paper.id %}">
    {% if exam_paper.total_score %}
      {{ exam_paper.total_score }}
    {% else %}
      Not scored yet
    {% endif %}
    </a>
  {% else %}
    Not answered yet
  {% endif %}
</td>
<td>
  {% if exam_paper and exam_paper.task %}
    <span class="label label-success">{{ exam_paper.task.status }}</span>
  {% else %}
    <span class="label label-default">N/A</span>
  {% endif %}
</td>
<td>
  {% if exam_paper and exam_paper.task %}
    <div class="assignee-select" data-assignee_info="{{exam_paper.task.assignee.id}}" data-task_id="{{exam_paper.task.id}}" data-task_type="exam_paper"></div>
  {% elif exam_paper %}
    <div class="assignee-select" data-assignee_info="" data-task_id="" data-task_type="exam_paper" data-target_id="{{ exam_paper.id }}"></div>
  {% else %}
    <span class="label label-default">N/A</span>
  {% endif %}
</td>
<td>
  {% if exam_paper and exam_paper.task %}
    <label class="i-checks m-b-none"><input type="checkbox" class="cb" data-task_type="exam_paper" data-task_id="{{exam_paper.task.pk}}"><i></i></label>
  {% elif exam_paper %}
    <label class="i-checks m-b-none"><input type="checkbox" class="cb" data-task_type="exam_paper" data-task_id="" data-target_id="{{ exam_paper.id }}"><i></i></label>
  {% else %}
    <span class="label label-default">N/A</span>
  {% endif %}
</td>